.PHONY: all
all: epoll_server epoll_client blocking_server blocking_client epoll_backupleader epoll_backupslave

epoll_server:
	cc -o epoll_server definition.h ringbuff.c epoll_server.c -lpthread
epoll_client:
	cc -o epoll_client definition.h ringbuff.c epoll_client.c -lpthread
blocking_server:
	cc -o blocking_server blocking_server.c -lpthread
blocking_client:
	cc -o blocking_client definition.h ringbuff.c blocking_client.c
epoll_backupleader:
	gcc -o epoll_backupleader definition.h ringbuff.c epoll_server_leader.c -lpthread -DBACKUP_LEADER
epoll_backupslave:
	gcc -o epoll_backupslave  definition.h ringbuff.c epoll_server_leader.c -lpthread -DBACKUP_SLAVE

.PHONY: clean
clean:
	rm epoll_server epoll_client blocking_server blocking_client epoll_backupleader epoll_backupslave
